import type { ElementHiderRuleConfig } from '../../../types/constants'
import { ElementSelectorPosition, ElementSelectorType } from '../../../types/constants'
import { ELEMENT_IDENTIFIER_CONFIG } from '../../service/element_identifier/types'

export const ZHI_HU_QUESTION_WEB_ELEMENT_CONFIG: ElementHiderRuleConfig = {
  [ELEMENT_IDENTIFIER_CONFIG.default.header.id]: {
    hide: true,
    selectorType: ElementSelectorType.Mix,
    selector: 'header.AppHeader',
    position: ElementSelectorPosition.TopCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.blog.articleTag.id]: {
    hide: false,
    selectorType: ElementSelectorType.Mix,
    selector: '.QuestionHeader .QuestionHeader-tags',
    nameZh: '回答-标签',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.base.follow.id]: {
    hide: false,
    selectorType: ElementSelectorType.Mix,
    selector: '.QuestionHeader .QuestionFollowStatus',
    nameZh: '回答-关注状态',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.default.contentAction.id]: {
    hide: false,
    selectorType: ElementSelectorType.Mix,
    selector: '.QuestionHeader .QuestionHeader-footer',
    nameZh: '回答-相关操作',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.default.contentActionTwo.id]: {
    hide: false,
    selectorType: ElementSelectorType.Mix,
    selector: '.RichContent .ContentItem-actions',
    nameZh: '内容-相关操作',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.default.loginModal.id]: {
    hide: true,
    selectorType: ElementSelectorType.Complex,
    selector: '.Modal-wrapper:has(.signFlowModal)',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.default.loginModalTwo.id]: {
    hide: true,
    selectorType: ElementSelectorType.Class,
    selector: '.Question-mainColumnLogin',
    nameZh: '内容-登录提示',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.ad.reward.id]: {
    hide: false,
    selectorType: ElementSelectorType.Mix,
    selector: '.ContentItem .RichContent .Reward',
    position: ElementSelectorPosition.MiddleCenter,
  },
  [ELEMENT_IDENTIFIER_CONFIG.default.rightAside.id]: {
    hide: true,
    selectorType: ElementSelectorType.Class,
    selector: '.Question-sideColumn',
    position: ElementSelectorPosition.MiddleRight,
  },
  [ELEMENT_IDENTIFIER_CONFIG.ad.contentAd.id]: {
    hide: true,
    selectorType: ElementSelectorType.Mix,
    selector: '.Question-sideColumn .Card:has(.AdvertImg)',
    nameZh: '右侧边栏-广告',
    position: ElementSelectorPosition.MiddleRight,
  },
  [ELEMENT_IDENTIFIER_CONFIG.blog.authorInfo.id]: {
    hide: false,
    selectorType: ElementSelectorType.Mix,
    selector: '.Question-sideColumn .Card.AnswerAuthor',
    nameZh: '右侧边栏-作者',
    position: ElementSelectorPosition.MiddleRight,
  },
  [ELEMENT_IDENTIFIER_CONFIG.base.favorite.id]: {
    hide: false,
    selectorType: ElementSelectorType.Mix,
    selector: '.Question-sideColumn .Card:has(.AnswerInfo-favlists)',
    nameZh: '右侧边栏-被收藏',
    position: ElementSelectorPosition.MiddleRight,
  },
  [ELEMENT_IDENTIFIER_CONFIG.default.footer.id]: {
    hide: true,
    selectorType: ElementSelectorType.Mix,
    selector: '.Question-sideColumn footer',
    nameZh: '右侧边栏-页脚',
    position: ElementSelectorPosition.MiddleRight,
  },
  [ELEMENT_IDENTIFIER_CONFIG.default.backTop.id]: {
    hide: true,
    selectorType: ElementSelectorType.Mix,
    selector: '[role=\'complementary\'] .CornerButtons',
    position: ElementSelectorPosition.BottomRight,
  },
}
